home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_bab_crate_puzzle1.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  78 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_CrateNoPush.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     startup
  13.     message     entered         
  14.     message     exited
  15.     
  16.     thing       crate0          linkid=3
  17.         
  18.     surface     lockoutsurf
  19.     
  20.     surface     pushsurf        linkid=4    mask=0x481
  21.     surface     blocksurf       linkid=4    mask=0x481
  22.     
  23.     thing       player          local
  24.         
  25. end
  26.  
  27. # ========================================================================================
  28. code
  29.  
  30. startup:
  31.  
  32.     player = GetLocalPlayerThing();
  33.     SetAdjoinFlags(lockoutsurf, 0x10); //no move
  34.     ClearThingFlags(crate0, 0x40000000);
  35.     
  36. return;
  37.       
  38. # ========================================================================================
  39. entered:
  40.  
  41.     if ((GetSenderRef() == pushsurf) && (GetSourceRef() == crate0))
  42.     {
  43.         //print("block has entered pushsurf");
  44.         ClearAdjoinFlags(lockoutsurf, 0x10);
  45.     }
  46.     
  47.     if ((GetSenderRef() == blocksurf) && (GetSourceRef() == crate0))
  48.     {
  49.         //print("block has entered blocksurf");
  50.         SetAdjoinFlags(lockoutsurf, 0x10);
  51.     }
  52.  
  53.     if ((GetSenderID() == 4) && (GetSourceRef() == player))
  54.     {
  55.         //print("player has entered a surf");
  56.         SetThingFlags(crate0, 0x40000000);      //make moveable
  57.         ClearThingFlags(crate0, 0x00000080);
  58.     }        
  59.     
  60. return;
  61.  
  62. # ========================================================================================
  63. exited:
  64.  
  65.     if ((GetSenderID() == 4) && (GetSourceRef() == player))
  66.     {
  67.         //print("player has entered a surf");
  68.         ClearThingFlags(crate0, 0x40000000);
  69.         SetThingFlags(crate0, 0x00000080);
  70.     }
  71.     
  72. return;
  73.  
  74. # ========================================================================================
  75.  
  76. end
  77.  
  78.